import request from '@/utils/request'

/* 列表分页*/
export function selectOutputPage(data) {
  return request({
    url: '/erp/output/selectOutputPage',
    method: 'post',
    data: data
  })
}

/* 列表分页*/
export function selectOutputList(data) {
  return request({
    url: '/erp/output/selectOutputList',
    method: 'post',
    data: data
  })
}

/* 新增*/
export function saveOutput(data) {
  return request({
    url: '/erp/output/saveOutput',
    method: 'post',
    data: data
  })
}

/* 修改*/
export function updateOutputById(data) {
  return request({
    url: '/erp/output/updateOutputById',
    method: 'post',
    data: data
  })
}

/* 根据id查询*/
export function selectOutputById(data) {
  return request({
    url: '/erp/output/selectOutputById/' + data,
    method: 'post'
  })
}

/* 删除*/
export function deleteOutputById(data) {
  return request({
    url: '/erp/output/deleteOutput',
    method: 'post',
    data: data
  })
}

/* 根据班次id和日期查询 */
export function selectByShiftIdAndOutputDate(data) {
  return request({
    url: '/erp/output/selectByShiftIdAndOutputDate',
    method: 'post',
    data: data
  })
}

/* 查询班次数量 */
export function selectShiftCount(data) {
  return request({
    url: '/erp/output/selectShiftCount',
    method: 'post',
    data: data
  })
}

/* 查询当前查询条件的总产量 */
export function selectOutputQuantity(data) {
  return request({
    url: '/erp/output/selectOutputQuantity',
    method: 'post',
    data: data
  })
}

/* ocr识别产量信息 */
export function doOcr(formData) {
  return request.post('/erp/output/ocr', formData)
  /* return request({
    url: '/erp/output/ocr',
    method: 'post',
    formData
  }) */
}

/* 批量保存ocr识别结果 */
export function saveOutputBatch(data) {
  return request({
    url: '/erp/output/saveOutputBatch',
    method: 'post',
    data: data
  })
}
